import stoneRequest from "../index";
import type { IAccount } from '@/types'

/**
 * 
 * login登录请求 
 */
export function accountLoginRequest(account: IAccount) {
  return stoneRequest.post({
    url: '/login',
    data: account
  })
}


/**
 * 
 * 通过id请求登陆用户的详细信息
 */
export function getUserInfoById(id: number) {
  return stoneRequest.get({
    url: `/users/${id}`,
  })
}

/**
 * 
 */
export function getUserMenusByRoleId(id: number) {
  return stoneRequest.get({
    url: `/role/${id}/menu`
  })
}